package dao

import (
	"time"
)

// 这是 SysAuthority 的全局公开dao对象
var SysAuthorityDao = sysAuthorityDao{}

// 这是 sys_authority表 的实体类
type SysAuthority struct {
	AuthorityId   string    `json:"authority_id" form:"authority_id" binding:"authority_id"`       // 角色ID
	AuthorityName string    `json:"authority_name" form:"authority_name" binding:"authority_name"` // comment:角色名
	ParentId      string    `json:"parent_id" form:"parent_id" binding:"parent_id"`                // 父角色ID
	DefaultRouter string    `json:"default_router" form:"default_router" binding:"default_router"` // 默认菜单
	CreatedAt     time.Time `json:"created_at" form:"created_at" binding:"created_at"`
	UpdatedAt     time.Time `json:"updated_at" form:"updated_at" binding:"updated_at"`
	DeletedAt     time.Time `json:"deleted_at" form:"deleted_at" binding:"deleted_at"`
}

// 注意:这是 SysAuthority 的私有dao对象
type sysAuthorityDao struct {
	Obj    SysAuthority
	Insert func(arg SysAuthority) int          //插入一条记录
	Update func(arg SysAuthority) int          //更新一条记录
	Delete func(arg SysAuthority) int          //删除一条记录
	Select func(arg SysAuthority) SysAuthority //获取一条记录
}
